package com.douqu.game.core.config;

import com.douqu.game.core.entity.GameObject;
import com.douqu.game.core.util.LoadUtils;

/**
 * Created by dengbo on 2018/9/28 0028.
 */
public class GuideConfig extends GameObject {
    //类型
    public int groupPass;


    @Override
    public boolean check()
    {
        return true;
    }


    @Override
    public boolean setVariable(String key, String value) {
        if ("groupPass".equals(key)){
            int[] temp = LoadUtils.loadToArray(key, value);
            if(temp.length == 0){
                groupPass = 0;
            }else {
                groupPass = temp[0];
            }
            return true;
        }else{
            return super.setVariable(key, value);
        }
    }

    @Override
    public String toString() {
        return "GuideConfig{" +
                "groupPass=" + groupPass +
                "} " + super.toString();
    }

}
